package com.bw.zyk.zhanggm.product.controller;


import com.bw.zyk.zhanggm.product.entity.Sku;
import com.bw.zyk.zhanggm.product.service.ISkuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Set;

/**
 * <p>
 * sku表,该表表示具体的商品实体,如黑色的 64g的iphone 8 前端控制器
 * </p>
 *
 * @author zhanggm
 * @since 2024-04-23
 */
@RestController
@RequestMapping("/sku")
public class SkuController {

    @Autowired
    private ISkuService iSkuService;

    @GetMapping("getSkuListByIds")
    public Collection<Sku> getSkuListByIds(@RequestParam("ProductIdSet") Set<Integer> ProductIdSet) {
        return iSkuService.listByIds(ProductIdSet);
    }

}
